<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
<title>拆礼盒</title>

<link href="__PUBLIC__/plugins/bootstrap/3.3.5/css/bootstrap.min.css" rel="stylesheet">
<link href="__PUBLIC__/plugins/font-awesome/4.3.0/css/font-awesome.min.css" rel="stylesheet">
<link href="__PUBLIC__/themes/global/global.css" rel="stylesheet">
<link href="__PUBLIC__/themes/wechat/openbox/style.css" rel="stylesheet">
<script src="__PUBLIC__/plugins/jquery/2.1.3/jquery.min.js"></script>
<script src="__PUBLIC__/plugins/bootstrap/3.3.5/js/bootstrap.min.js"></script> 
<script src="__PUBLIC__/js/global.js"></script>
<script src="__PUBLIC__/js/wechat/cmcc_openbox/index.js"></script>
<script>
var Param = <?php echo json_encode($param) ?>;
$(function(){
  Index.init(<?php echo json_encode( $config ) ?>);
});
</script>
</head>
<body>
<div class="body">
  <div class="bg">
    <img src="<?php echo site_url( '/' . $config['event_data']['home_bg_img'] ) ?>">
  </div>
  <div class="title">
    <?php echo $config['event_data']['title'] ?>
  </div>
  <div class="button-layout">
    <?php if ( $my_total_box > 0 ) : ?>
    <a href="<?php echo $my_box_url ?>" class="home-btn my_box" style="margin-right:16px;">查看我的礼盒</a>
    <a href="<?php echo $take_box_url ?>" id="to_take_box_btn" class="home-btn take_box_again" >再领一个</a>
    <?php else : ?>
    <a href="<?php echo $take_box_url ?>" id="to_take_box_btn" class="home-btn take_box" >再领一个</a>
    <?php endif ; ?>
  </div>
  
  <div class="link-info">
    <a href="#" style="margin-right:16px;"><i class="fa fa-trophy "></i> 获奖名单</a>
    <a href="#"><i class="fa fa-file-text-o"></i> 活动规则</a>
  </div>
  
  <div class="num-info">
    已有<span><?php echo $config['event_data']['total_take_user']?></span>人参加活动
  </div>
  
  <div class="author-info">
    此活动由<span>火凤凰大数据</span>公众号提供
  </div>
</div>

<!-- Modal -->
<div class="modal fade" id="list_modal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
  <div class="modal-dialog modal-sm" role="document">
    <div class="modal-content">
      <div class="modal-body">
        <ul class="nav nav-pills list-nav">
          <li role="presentation"><a href="#"><img src="__PUBLIC__/themes/wechat/openbox/images/title_list.png"></a></li>
          <li role="presentation"><a href="#"><img src="__PUBLIC__/themes/wechat/openbox/images/title_rule.png"></a></li>
        </ul>
        <div class="modal-inner">
          <table class="table-sample" width="100%" border="0" cellpadding="0" cellspacing="0">
            <thead>
              <tr>
                <th>姓名</th>
                <th>奖品名称</th>
              </tr>
            </thead>
            <tbody>
            </tbody>
          </table>
          <nav>
            <ul class="pager">
              <li class="previous"><a id="prev_page_btn" href="#"><i class="fa fa-arrow-left"></i> 上一页</a></li>
              <li class="page_info">1/4</li>
              <li class="next"><a id="next_page_btn" href="#">下一页 <i class="fa fa-arrow-right"></i></a></li>
            </ul>
          </nav>
        </div>
        <div class="modal-inner">
          <dl>
            <dt>活动时间</dt>
            <dd><?php echo $config['event_data']['start_time'] .' - ' . $config['event_data']['end_time'] ?> </dd>
          </dl>
          
          <dl>
            <dt>活动规则</dt>
            <dd><?php echo $config['event_data']['rule'] ?> </dd>
          </dl>
          
          <dl>
            <dt>领奖说明</dt>
            <dd><?php echo $config['event_data']['awarding_rule'] ?> </dd>
          </dl>
        </div>
        <button type="button" class="btn btn-default btn-block" data-dismiss="modal">关闭</button>
      </div>
    </div>
  </div>
</div>

</body>
</html>